package com.sen.gulimall.product.feign.fallback;

import com.sen.common.exception.BizCodeEnum;
import com.sen.common.utils.R;
import com.sen.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author Kisen
 * @email lqs0911@qq.com
 * @date 2023/2/9 16:17
 * @detail
 */
@Slf4j
@Component
public class SeckillFeignFallback implements SeckillFeignService {
    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.info("熔断方法调用...getSkuSeckillInfo");
        return R.error(BizCodeEnum.TOO_MANY_REQUEST.getCode(), BizCodeEnum.TOO_MANY_REQUEST.getMsg());
    }
}
